package com.wangshen.administrator.ygqq.utils;

import okhttp3.FormBody;
import okhttp3.RequestBody;

/**
 * Created by Administrator on 2016/7/26.
 */
public class ToRequestBody {
    public RequestBody toRequestBody(FormBody.Builder builder , String body){
        String[] result = body.split("&");
        for (String str : result) {
            String[] keyValue = str.split("=");
            builder.add(keyValue[0], keyValue[1]);
        }
        return builder.build();
    }
}
